
<html>
<head>
<meta charset="UTF-8">
<title>数据表模型信息修改</title>
<link href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<link href="../../static/css/esaas-easyui-edit.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<body class="easyui-layout" scroll="no">
	<form id="ff" method="post">
		<div class="esaas-info-title">表模型信息</div>
		<table class="esaas-info-edit-table">
	    		<tr>
	    			<td width="15%" align="right">表模型代码：</td>
	    			<td width="35%"><input class="easyui-textbox" type="text" name="objectCode" data-options="required:true" style="width:100%;height:25px;"></input></td>
	    			<td width="15%" align="right">表模型名称：</td>
	    			<td width="35%">
	    				<input class="easyui-textbox" type="text" name="objectName" data-options="required:true" style="width:100%;height:25px;"></input>
	    				<input type="hidden" name="objectId" id="projectId"></input>
	    				<input type="hidden" name="packageId" id="packageId"></input>
	    				<input type="hidden" name="objectType" value="1201"></input>	    				
	    			</td>	    			
	    		</tr>
	    		<tr>
	    			<td width="15%" align="right">表数据周期：</td>
	    			<td>
	    				<select class="easyui-combobox" id="tableDataCycle" name="tableDataCycle" style="width:100%" data-options="required:true,editable:false,valueField:'enname',textField:'cnname',data:DM_DATA_CYCLE"></select>
	    			</td>
	    			<td width="15%" align="right">所属主题域：</td>
	    			<td>
	    				<input class="easyui-textbox" type="text" name="subjectId" data-options="required:false" style="width:100%;height:25px;"></input>
	    			</td>	    			
	    		</tr>	    		
	    		<tr>
	    			<td width="15%" align="right" valign="top">表模型描述：</td>
	    			<td colspan="3">
	    				<textarea name="objectDesc" class="easyui-validatebox" style="overflow-x:hidden;height:60px;width:98.5%;"></textarea>
	    			</td>
	    		</tr>
	    	</table>
	    </div>
	</form>
	<div style="text-align: center; padding: 15px">
		<a href="javascript:void(0)" class="easyui-linkbutton"
			onclick="submitForm()">&nbsp;保&nbsp;存&nbsp;</a> <a
			href="javascript:void(0)" class="easyui-linkbutton"
			onclick="closeForm()">&nbsp;关&nbsp;闭&nbsp;</a>
	</div>
	<script>		
		$(function() {
			var objectId = $.getUrlParam('objectId');
			$.restfulGet('../../api/model/table/info/' + objectId,null,function(data){
					$('#ff').form('load', {
						objectId : data.rows.objectId,
						objectCode : data.rows.objectCode,
						objectName : data.rows.objectName,
						objectType : data.rows.objectType,
						packageId : data.rows.packageId,
						projectId : data.rows.projectId,
						objectState : data.rows.objectState,
						subjectId : data.rows.subjectId,
						orderValue : data.rows.orderValue,
						objectDesc : data.rows.objectDesc,
						objectLocation : data.rows.objectLocation,
						tableDataCycle : data.rows.tableDataCycle,
						tableRecordLength : data.rows.tableRecordLength,
						createUser : data.rows.createUser,
						createTime : data.rows.createTime
					});					
			});
		});
	
		function submitForm() {
			if (!$('#ff').form('validate'))
				return;
			var jsonData = $("#ff").serializeJson();
			$.restfulPut('../../api/model/table/info', jsonData, function(data) {
				window.parent.reloadList();
			});
		};
		
		function closeForm(){
			window.parent.JLEUtil.closewin();
		}
	</script>
</body>
</html>
